package com.letoken.platform.repo.admin.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 系统代币表
 * </p>
 *
 * @author 作者
 * @since 2022-12-12
 */
@Getter
@Setter
@TableName("token")
@ApiModel(value = "Token对象", description = "系统代币表")
public class AdminToken extends Model<AdminToken> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("公链ID(0平台 1 BSC 2 ETH)")
    @TableField("chain_id")
    private Integer chainId;

    @ApiModelProperty("代币图片地址")
    @TableField("icon_url")
    private String iconUrl;

    @ApiModelProperty("代币名称")
    @TableField("token_currency")
    private String tokenCurrency;

    @ApiModelProperty("代币合约地址")
    @TableField("token_address")
    private String tokenAddress;

    @ApiModelProperty("是否使用 0-否 1-是")
    @TableField("is_use")
    private Integer isUse;

    @ApiModelProperty("精度")
    @TableField("decimals")
    private Integer decimals;

    @ApiModelProperty("排序")
    @TableField("sort")
    private Integer sort;

    @ApiModelProperty("价格(美元)")
    @TableField("usd_price")
    private String usdPrice;

    @ApiModelProperty("24小时价格变动(%)")
    @TableField("usd_change")
    private String usdChange;

    @ApiModelProperty("创建日期")
    @TableField("create_time")
    private LocalDateTime createTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
